#ifndef DATA_RULE_H
#define DATA_RULE_H

#include "Data/Objects/Action.h"
#include "Data/Objects/Command.h"

namespace data {

	struct Rule {
	public:
		Rule(
			const Command& command,
			const Action& action ) :
			m_command( command ),
			m_action( action )
		{}

		Rule( const Rule& rule ) :
			m_command( rule.m_command ),
			m_action( rule.m_action )
		{}

		inline const Command GetCommand() const { return m_command; }
		inline void SetCommand( const Command& command ) { m_command = command; }

		const Action GetAction() const { return m_action; }
		inline void SetAction( Action action ) { m_action = action; }

	private:
		Command m_command;
		Action m_action;
	};

	inline bool operator == ( const Rule& a, const Rule& b ) {
		if( a.GetCommand() != b.GetCommand() ) return false;
		if( a.GetAction() != b.GetAction() ) return false;
		return true;
	}

	inline bool operator != ( const Rule& a, const Rule& b ) {
		return !( a == b );
	}
}
#endif
